<include file="Public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
  <section class="content">
    <div class="container-fluid">  
      <div class="panel panel-default"> 
        <div class="panel-heading">
          <h3 class="panel-title"><i class="fa fa-list"></i> 下线明细</h3>
        </div>
        <div class="panel-body">    
		<div class="navbar navbar-default">                    
                <form id="search-form2" class="navbar-form form-inline"  method="get" action="/index.php/Admin/crm/xiaxians/user_id/{:I("user_id")}">
				<div class="form-group">
				  <div class="input-group">
				      <input type="text" name="user_name" id="user_name" value="{:I('user_name')}" placeholder="公司/姓名" class="input-sm">
				        </div>
				 </div>
            <div class="form-group">
                <div class="input-group">
                    <input type="text" name="timegap" value="{$timegap}" placeholder="消费日期"  id="add_time" class="input-sm" style="width: 220px;">
                </div>
            </div>
				 <div class="form-group">
					 <input type="hidden" name="id" id="id" value="{:I('id')}">
				     <button type="submit" id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选</button>
				      </div>
                <div class="form-group" style="float: right;">    
                    <button type="button" class="btn btn-default pull-right" id="daochus"><i class="fa fa-file-excel-o"></i>&nbsp;导出excel</button>
                </div>                                 
                </form>    
          </div>                        
          <div id="ajax_return">                  
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
								<th class="sorting text-left">ID</th>
                                <th class="sorting text-left">会员昵称</th>
								<th class="sorting text-left">公司/姓名</th> 
                                <th class="sorting text-left">手机号码</th>
                                <th class="sorting text-left">注册日期</th>
                            </tr>
                            </thead>
                            <tbody>

                            <volist name="list" id="v">

                                <tr>
									<td class="text-left">{$v.user_id}</td>
                                    <td class="text-left">{$v.nick_name}</td> 
									<td class="text-left">{$v.company}</td>
                                    <td class="text-left" style="color:red;">{$v.mobile}</td>
									<td class="text-left">{$v.reg_time|date="Y-m-d H:i",###}</td>
                                    <!--<td class="text-left"><a href="{:U('Admin/Distribut/editWithdrawals',array('id'=>$v[withdrawals_id]))}">查看</a></td>-->
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>
                
                <div class="row">
                    <div class="col-sm-6 text-left"></div>
                    <div class="col-sm-6 text-right">{$show}</div>
                </div>
          
          </div>
        </div>
      </div>
    </div>
    <!-- /.row --> 
  </section>
  <!-- /.content --> 
</div>
<!-- /.content-wrapper --> 
 <script>
 
$(document).ready(function() {

    $('#add_time').daterangepicker({
        format:"YYYY-MM-DD HH:mm",
        singleDatePicker: false,
        showDropdowns: true,
        minDate:'2021-01-01 00:00',
        maxDate:'2030-01-01 00:00',
        startDate:'{:date("Y-m-d")} 00:00',
        showWeekNumbers: true,
        timePicker: true,
        timePickerIncrement: 1,
        timePicker12Hour: false,
        opens: 'right',
        buttonClasses: ['btn btn-default'],
        applyClass: 'btn-small btn-primary',
        cancelClass: 'btn-small',
        locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间',
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
    });

	$('#create_date').daterangepicker({
		format:"YYYY-MM-DD",
		singleDatePicker: false,
		showDropdowns: true,
		minDate:'2020-01-01',
		maxDate:'2030-01-01',
		startDate:'{:date("Y-m-d H:i")}',
        showWeekNumbers: true,
        timePicker: false,
        timePickerIncrement: 1,
        timePicker12Hour: true,
        ranges: {
           '今天': [moment(), moment()],
           '昨天': [moment().subtract('days', 1), moment().subtract('days', 1)],
           '最近7天': [moment().subtract('days', 6), moment()],
           '最近30天': [moment().subtract('days', 29), moment()],
           '上一个月': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
        },
        opens: 'right',
        buttonClasses: ['btn btn-default'],
        applyClass: 'btn-small btn-primary',
        cancelClass: 'btn-small',
	    locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间',
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
	});
		$("#daochus").click(function(){
			var user_id={:I('user_id')};
			var user_name=$("#user_name").val();
			location.href="/Admin/crm/export_xians?user_id="+user_id+"&user_name="+user_name;
		})
});
</script>
</body>
</html>